feat: 내 제품 vs 경쟁사 비교 분석 (+ 실데이터 크롤링/Gemini 동작)#35
Merged
Conversation
링크 입력을 평면 urls(전부 경쟁사)에서 내 제품 URL(필수) + 경쟁 상품 URL(1~3개)로 분리해 받고, 두 제품군 리뷰를 비교하여 내 제품에서 개선할 점을 도출하도록 변경. BE: ProductReviews/ProductSummary.is_mine, Analysis.my_url(+마이그레이션), Insights.comparison_summary(additive), create_analysis(my_url,competitor_urls) 및 파이프라인 역할 구분 크롤링, Mock/Gemini 분석기 비교 관점 재작성, 핸들러 요청/뷰 갱신, 통합 테스트 보강. FE: 입력 분리(UrlInput), 비교 총평/내제품 배지/평균평점 비교 헤더, AnalysisCard·types·dashboard 갱신, 테스트 갱신. Refs #34 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
쿠팡 Akamai 차단으로 실제 리뷰 수집이 막혀 비교 분석을 실데이터로 검증할 수 없던 문제를 해결한다. 크롤러(coupang): - COUPANG_COOKIE/COUPANG_UA 로 실제 브라우저 검증 쿠키(_abck 등) 주입 지원 - COUPANG_USE_CURL 시 curl 로 위임(reqwest TLS 핑거프린트가 Akamai에 차단됨) - 쿠팡 리뷰 API 의 페이지당 size 제한(~30)에 맞춘 페이지네이션 (build_review_api_url 에 page 인자 추가, limit 까지 누적 수집) 분석기(gemini): - gemini-2.5-flash thinking 토큰이 출력 예산을 잠식해 JSON 이 잘리던 문제 (thinkingConfig.thinkingBudget=0 + maxOutputTokens 8192) 모두 env 게이트/기본 동작 변경 없음. 코드에 시크릿 없음. Refs #34 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #34
작업 요약
링크 입력을 내 제품 URL(필수) + 경쟁 상품 URL(1~3개) 로 구분해 받고, 두 제품군 리뷰를 비교하여 내 제품에서 개선할 점을 도출하도록 기능을 전환했다. 추가로, 실제 쿠팡 데이터로 동작을 검증하는 과정에서 막혔던 크롤링/LLM 문제를 해결했다.
변경 내용
1) 비교 분석 기능 (commit 66629ba)
ProductReviews/ProductSummary.is_mine,Analysis.my_url(Option),Insights.comparison_summary(additive)00004_analysis_my_url.sql—analyses.my_url컬럼(nullable)create_analysis(my_url, competitor_urls, review_limit); 파이프라인에서 내 제품 먼저 크롤링(is_mine=true) 후 경쟁사 크롤링CreateAnalysisRequest{my_url, competitor_urls}, 응답 뷰에my_url추가(기존urls유지)2) 실데이터 크롤링·LLM 동작 (commit d3782b9)
COUPANG_COOKIE/COUPANG_UA로 검증 쿠키 주입,COUPANG_USE_CURL로 curl 위임(reqwest TLS 핑거프린트가 Akamai에 차단됨), 페이지당 size≤30 페이지네이션thinkingConfig.thinkingBudget=0+maxOutputTokens 8192검증
주요 결정과 이유
urls/필드 유지)로 하위호환 확보; 요청 타입만 기능상 변경Wiki 반영 예정
API(요청/응답 스키마),Backend(크롤러 우회·페이지네이션·Gemini 설정),Frontend(입력/결과 UI)참고 / 후속
COUPANG_PROXY_URL) 권장